{
    title: "Pak Modes",
    crumbs: [
        { "User's Guide": "index.html" }
    ],
}

            <h1>Pak Modes</h1>
            <p>Pak supports the definition of execution modes / profiles. For example: <em>debug</em>, <em>test</em>
                or <em>release</em> mode. By defining an execution mode, a specific Pak configuration may be easily
                defined and enabled.</p>

            <p>The Pak mode is defined via the <em>pak.mode</em> property. This then selects collections of properties
            under the <em>pak.modes</em> property. For example:
            <code>{
    "pak": {
        <b>"mode": "debug"</b>,
        "modes": {
            "debug": {
                "import": true,
            },
            "release": {
                "pak": {
                    "import": false,
                }
            }
        }
    }
}
</code>
            <p>When the mode is set to <em>debug</em>, the properties under <em>pak.modes.debug</em> are 
            logically copied to the top level of the package.json properties. i.e. <em>pak.import</em> is set to true.

            <h2>Changing Mode</h2>
            <p>Use the <em>pak mode MODE</em> command to change the execution mode. For example:</p>
            <code>pak mode debug</code>
            <p>To display the current mode, run: <code>pak mode</code></p>

            <h2>Other Applications</h2>
            <p>Other applications such as <a href="http://embedthis.com/expansive/">Expansive</a> utilize the 
            package.json <em>pak.mode</em> setting and modify their execution mode similarly. The 
            <a href="http://embedthis.com/esp/">ESP Web Framework</a> also uses the <em>pak.mode</em> setting.</p>
                